import React, { Component } from "react";

export default class App extends Component {
    state = {
        msg: '<h1>dangerouslySetInnerHTML</h1>'
    }
    
    render() {
      return (
          <div>
              { this.state.msg }
              {/* 相当于vue的v-html */}
              <div dangerouslySetInnerHTML= { {__html:this.state.msg} }></div>
          </div>
      )
    }
}